package com.dly.hope.modle;

import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 群组
 */
@Entity
@Table(name = "hope011_group")
@DynamicUpdate
@DynamicInsert

@Data
public class Group extends BaseEntity {

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;

    @Column(name = "groupNumber", unique = true, length = 12)
    @Comment(value = "群号")
    private String groupNumber;

    @Column(name = "group_master")
    @Comment(value = "群主")
    private String groupMaster;

    @Column(name = "name")
    @Comment(value = "群名")
    private String name;

    @Column(name = "avatar")
    @Comment(value = "头像")
    private String avatar;
}
